<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2021/5/26
 * Time: 17:28
 */

namespace app\controller;


use app\model\ConfigModel;

class TencentDeveloper
{
    public function index(){
        $configModel = new ConfigModel();
        $config = $configModel->where('biz','tencent_develop_curl')->field('val')->find();
        $start = $config['val'];
        $step = 500;
        $configModel->where('biz','tencent_develop_curl')->update(['val' =>$start+$step]);
        $str =  "<a href='https://cloud.tencent.com/developer/article/{$start}'>地址</a>&nbsp;&nbsp;";
        $end = $start;
        while ($end< ($start+$step)){
            $end = $end+1;
            $str = $str . "<a href='https://cloud.tencent.com/developer/article/{$end}'>地址</a>&nbsp;&nbsp;";
        }
        echo $str;
    }
}